<template>
    <div id="app">
        <router-view v-if="$store.state.username"></router-view>
        <Login v-else></Login>
    </div>
</template>

<style lang="scss">
* {
    padding: 0;
    margin: 0;
    list-style: none;
}
html,
body {
    height: 100%;
    background-color: #efefef;
}
#app {
    height: 100%;
}
a {
    color: #000;
    text-decoration: none;
}

</style>

<script>
import Login from '@v/Login'
export default {
    components: { Login },
    created() {
        this.$store.dispatch('userinfo')
    }

}
</script>
